<!--#set($article = $fn.article_id($params.get("id")))-->
<!--#set($page_title = "$article.TITLE - $setting.sysname")-->
<!DOCTYPE html>
<html>
	<head>
	#parse("tpl/gabz/meta.htm")
	<style type="text/css">
	.crumbs {margin:0 auto;}
	.crumbs a.active {color:#2B6DC3;}
	
	.message {border:2px solid #ddd; border-top:0;}
	.message .list {padding:23px 44px; background:#fff;}
	.message .list .title {height:50px; line-height:50px; font-size:22px; font-family:'黑体';}
	.message .list .summary {margin-bottom:20px; color:#656565;}
	.message .photo img {width:120px;}
	.message .list .tips {color:#999;}
	.message .list .item {margin-bottom:23px; border:1px solid #ddd;}
	.message .list .item-active {border:1px solid #2B6DC4; border-bottom:2px solid #2B6DC4;}
	</style>
	</head>
	<body style="background:#F3F3F3;">
		#parse("tpl/gabz/header.htm")
		
		<table class="crumbs" align="center" width="1000" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td height="45">
					您的位置 : 
					<a href="index.htm" title="首页">首页</a> > 
					<a href="message.htm" title="主任信箱">主任信箱</a> >
					<a href="message_post.htm?id=${params.id}" title="我要写信" class="active">我要写信</a>
				</td>
			</tr>
		</table>
		
		<table class="message" align="center" width="1000" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td>
					<img src="$THEME/images/icon-message-top.jpg"/>
				</td>
			</tr>
			<tr>
				<td class="list">
					<table class="detail" width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td width="190" align="center" height="210" class="image">
								<p class="photo"><img src="${article.IMG}" border="0"/></p>
							</td>
							<td>
								<p class="title">${article.TITLE}</p>
								<p class="summary">${article.CONTENT}</p>
							</td>
						</tr>
					</table>
					
					<p>
						<img src="$THEME/images/icon-message-line.jpg"/>
					</p>
					
					<br/>
					
					<form action="message_post.htm?id=${params.id}" method="post" onsubmit="javascript:return check_form(this);">
						<input type="hidden" name="formsubmit" value="yes" />
						<table width="100%" cellspacing="0" cellpadding="4" border="0">
								<tr>
									<td width="80" height="50">标题：</td>
									<td>
										<input type="text" name="title" size="35" maxlength="50"/>
										<span class="tips">(*50字以内)</span>
									</td>
								</tr>
								<tr>
									<td height="50">联系人：</td>
									<td>
										<input type="text" name="writer" size="20" maxlength="20"/>
										<span class="tips">(*真实姓名)</span>
									</td>
								</tr>
								<tr>
									<td height="50">联系电话：</td>
									<td>
										<input type="text" name="phone" size="15" maxlength="30"/>
										<span class="tips">(*常用的联系电话)</span>
									</td>
								</tr>
								<tr>
									<td height="50">手机号码：</td>
									<td>
										<input type="text" name="mobile" size="30" maxlength="30"/>
									</td>
								</tr>
								<tr>
									<td valign="top">详细内容：</td>
									<td>
										<textarea rows="6" cols="60" name="content" style="width:95%;"></textarea>
										<br/>
										<span class="tips">(*信件的详细内容，不限字数。)</span>
										<br/><br/>
									</td>
								</tr>
								<tr>
									<td></td>
									<td>
										<button type="submit">　提交　</button>
										<button type="reset" class="button-gray">　重置　</button>
									</td>
								</tr>
						</table>
					</form>
				</td>
			</tr>
		</table>
		
		<br/>
		<br/>
		<br/>
		
		#parse("tpl/gabz/footer.htm")
		
		<script type="text/javascript">
		function check_form(frm){
			if(frm.title.value == ''){
				alert('标题不能为空！');
				frm.title.focus();
				return false;
			}
			
			if(frm.writer.value == ''){
				alert('联系人不能为空！');
				frm.writer.focus();
				return false;
			}
			
			if(frm.phone.value == ''){
				alert('联系电话不能为空！');
				frm.phone.focus();
				return false;
			}
			
			if(frm.content.value == ''){
				alert('信件内容不能为空！');
				frm.content.focus();
				return false;
			}
			
			return true;
		}
		</script>
		
		<!--#if($params.formsubmit == 'yes')-->
			<!--#set($msg = $fn.message_add())-->
			<script type="text/javascript">
			alert('${msg.message}');
			location.href = 'message_post.htm?id=${params.id}';
			</script>
		<!--#end-->
	</body>
</html>